<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        {{name}}
        <h3>用户名:{{user.name}}</h3>
        <h3>性别:{{user.sex=='女'}}</h3>
        <h3>判断:{{1==='1'}}</h3>
        <h3>性别:{{user.type=='1'?'管理员':'游客'}}</h3>
    </div>
</body>
</html>
<script src="js/2.7.14_dist_vue.js"></script>
<script>
    const app = new Vue({
        el:"#app", //elemrnt 用来给Vue实例定义一个作用范围
        data:{      //用来给Vue实例定义一些相关数据
            msg:"vue欢迎你",
            name:"张飒",
            user:{
                name:"cc",
                sex:"男",
                type:"1", //1是管理员，除了1都是游客
            }
        }
    })
</script>